package com.alibaba.controller;

import com.alibaba.bean.ValResult;
import com.alibaba.bean.Value;
import com.alibaba.service.ValueService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping(value = "/value", method = RequestMethod.GET)
public class ValueController {

    @Autowired
    private ValueService valueService;

    @PostMapping("/estimate")
    public ValResult estValue(Value value) {
        return valueService.estValue(value);
    }

}
